import request from '@/config/axios'

export interface BasicSettingVO {
  id: number
  matchUser: number
  matchNonUser: number
  likeNum: number
  morningBegin: Date
  morningEnd: Date
  afternoonBegin: Date
  afternoonEnd: Date
  commentAuth: byte
  processTime: number
  commissionRatio: number
  effectiveTime: number
  status: byte
  userAgreement: string
  privacyAgreement: string
  facialAgreement: string
}

// 查询相亲基础设置列表
export const getBasicSettingPage = async (params) => {
  return await request.get({ url: `/blind/basic-setting/page`, params })
}

// 查询相亲基础设置详情
export const getBasicSetting = async (id: number) => {
  return await request.get({ url: `/blind/basic-setting/get?id=` + id })
}

// 新增相亲基础设置
export const createBasicSetting = async (data: BasicSettingVO) => {
  return await request.post({ url: `/blind/basic-setting/create`, data })
}

// 修改相亲基础设置
export const updateBasicSetting = async (data: BasicSettingVO) => {
  return await request.put({ url: `/blind/basic-setting/update`, data })
}

// 删除相亲基础设置
export const deleteBasicSetting = async (id: number) => {
  return await request.delete({ url: `/blind/basic-setting/delete?id=` + id })
}

// 导出相亲基础设置 Excel
export const exportBasicSetting = async (params) => {
  return await request.download({ url: `/blind/basic-setting/export-excel`, params })
}
